package com.zengqingfa.basic.enums;

/**
 * @fileName: EnumSingletonDemo
 * @author: zengqf3
 * @date: 2020-9-6 13:12
 * @description:
 */
public class EnumSingletonDemo {
    //定义一个静态枚举类
    enum SingletonEnum {
        //创建一个枚举对象，该对象天生为单例
        INSTANCE
    }

    public static void main(String[] args) {
        SingletonEnum singletonEnum = SingletonEnum.INSTANCE;
        System.out.println(singletonEnum);//INSTANCE
    }
}

